package com.person;

public class Person {
//    公共
    public String name = "张三";
//    默认的 default
    String  age = "20";
//  私有
    private String money = "100";
//  受保护
    protected String computer = "华为";

    public Person() {
        System.out.println("父类无参方法被调用!");
    }

    public Person(String name, String age, String money, String computer) {
        this.name = name;
        this.age = age;
        this.money = money;
        this.computer = computer;
        System.out.println("父类带参方法被调用!");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getComputer() {
        return computer;
    }

    public void setComputer(String computer) {
        this.computer = computer;
    }
}
